<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2018/4/17 0017
  Time: 18:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/bootstrap.min.css"
          type="text/css"/>
    <script src="${pageContext.request.contextPath}/js/jquery-1.11.3.min.js"
            type="text/javascript"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"
            type="text/javascript"></script>
</head>
<body>
<form name=traderefund action="" method=post
      target="_blank">
    <div id="body3" class="tab-content" name="divcontent">
        <dl class="content">
            <dt>商户订单号 ：</dt>
            <dd>
                <input id="WIDTRout_trade_no" name="WIDTRout_trade_no"/>
            </dd>
            <hr class="one_line">
            <dt>支付宝交易号 ：</dt>
            <dd>
                <input id="WIDTRtrade_no" name="WIDTRtrade_no"/>
            </dd>
            <hr class="one_line">
            <dt>退款金额 ：</dt>
            <dd>
                <input id="WIDTRrefund_amount" name="WIDTRrefund_amount"/>
            </dd>
            <hr class="one_line">
            <dt>退款原因 ：</dt>
            <dd>
                <input id="WIDTRrefund_reason" name="WIDTRrefund_reason"/>
            </dd>
            <hr class="one_line">
            <dt>退款请求号 ：</dt>
            <dd>
                <input id="WIDTRout_request_no" name="WIDTRout_request_no"/>
            </dd>
            <hr class="one_line">
            <dt></dt>
            <dd id="btn-dd">
						<span class="new-btn-login-sp">
							<button class="new-btn-login" id="refound" type="submit"
                                    style="text-align: center;">退 款</button>
						</span> <span class="note-help">商户订单号与支付宝交易号二选一，如果您点击“退款”按钮，即表示您同意该次的执行操作。</span>
            </dd>
        </dl>
    </div>
</form>
</body>
<script>
    $("#refound").click(function () {
        $.ajax(
            {
                url: "/payJsp/alipay.trade.refund.jsp.do",
                data: {
                    WIDTRout_trade_no: $("#WIDTRout_trade_no").val(),
                    WIDTRrefund_amount: $("#WIDTRrefund_amount").val()
                },
                success: function (msg) {
                    console.log(msg)
                    alert(msg)
                }
            }
        )
    })
</script>
</html>
